home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir39 / echoblok.zip / ECHOBLOK.DOC < prev    next >
Text File  |  1993-08-01  |  3KB  |  62 lines

  1.  
  2. ________ECHOBLOK                                                          Ver. 1.00
  3.  
  4.  
  5. Purpose: EchoBlock is made to be used with DOS 6's CONFIG.SYS menu system.
  6.          It prints on screen just the parts of a CONFIG.SYS file that would
  7.          be operative under a given menu choice.  You might use it in a DOS
  8.          boot-up screen, and it may be useful in debugging a complex
  9.          CONFIG.SYS.
  10.  
  11. Format:     ECHOBLOK [filespec] header
  12.  
  13.          ________         filespec is optional.  It defaults to CONFIG.SYS (in the current
  14.          directory).
  15.  
  16.                                     ______         You must specify the block header, and you may but needn't put
  17.          [brackets] around it.
  18.  
  19.          DOS puts the name of the header chosen at the CONFIG.SYS menu into
  20.          an environment variable, CONFIG.  Therefore, you can cover most of
  21.          the ground in an AUTOEXEC.BAT line that runs:
  22.  
  23.             ECHOBLOK C:\CONFIG.SYS %CONFIG%
  24.  
  25. Remarks: My AUTOEXEC.BAT leaves me in DOS, with a screen showing informa-
  26.          tion about what's running, what TSR's are loaded, etc.  In the
  27.          past, I've kept a small stable of CONFIG.SYS files, and swapped
  28.          them in as wanted, rebooting to give them effect.  So, usually, it
  29.          was convenient to simply type the whole CONFIG.SYS file onto the
  30.          boot-up screen to show what's going on.
  31.  
  32.          DOS 6 gives us a nice menu system in CONFIG.SYS, now, so all my
  33.          little CONFIG.xxx files are collected into one, and I get to
  34.          choose from the menu which to operate.  Convenient, but that
  35.          CONFIG.SYS is much too big to fit on a screen, even at 43 to 60
  36.          lines.  Anyway, most of it's irrelevant, because only the block my
  37.          menu choice called for was operative.  Hence, EchoBlock.  It reads
  38.          from CONFIG.SYS and puts on the screen the text of the header
  39.          block called for.
  40.  
  41.          There are a few complications.  If there are several blocks in
  42.          CONFIG.SYS with the same name (it would be a bungle), only the
  43.          first one will be used.  The exception is [COMMON].  There may be
  44.          several blocks with this label, and DOS will execute them all.
  45.          Further, an INCLUDE statement in one block will activate another.
  46.          INCLUDEs are recursive, so blocks INCLUDEd in an INCLUDEd block
  47.          will also be executed.
  48.  
  49.          EchoBlock reads the file just the way DOS 6 does.  Since DOS exe-
  50.          cutes all [COMMON] blocks, EchoBlock displays them all.  For all
  51.          other labels, only the first matching block will be displayed.
  52.          That holds for the block called in the command line parameter, and
  53.          also for a block called in an INCLUDE line.  REM lines and blank
  54.          lines are skipped, and lines of more than 78 columns will be brok-
  55.          en as neatly as possible.
  56.  
  57.          Since EchoBlock writes to standard output, you can redirect its
  58.          output to a printer or a file.
  59.  
  60.                                             fecit R. N. Wisan, August, 1993
  61.                                           37 Clinton St., Oneonta, NY 13820
  62.                                               internet: WISANR@hartwick.edu